package day6;

import java.util.Scanner;

public class TestDemo9 {
    public static int func(String s) {
        if(s.isEmpty() || s == null) {
            return 0;
        }
        char[] chars = s.toCharArray();
        int flg = 1;
        if(chars[0] == '-') {
            flg = -1;
            chars[0] = '0';
        } else if(chars[0] == '+') {
            flg = 1;
            chars[0] = '0';
        }
        int sum = 0;
        for (int i = 0; i < chars.length; i++) {
            if(chars[i] < '0' || chars[i] > '9') {
                sum = 0;
                break;
            }
            sum = sum * 10 + chars[i] - '0';
        }
        return flg * sum;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        System.out.println(func(s));
    }
}
